# 添加GTest测试框架
find_package(GTest REQUIRED)

# 添加测试可执行文件
add_executable(ocv_service_impl_test
    ${CMAKE_SOURCE_DIR}/src/ocv_service_impl.cpp
    ocv_service_impl_test.cpp
)

# 链接测试框架和项目库
target_link_libraries(ocv_service_impl_test
    GTest::GTest
    GTest::Main
    ocv_proto_lib
    ${OpenCV_LIBS}
)

# 添加测试目标
add_test(NAME ocv_service_impl_test COMMAND ocv_service_impl_test)
